package com.syuntax.domain;

import com.syuntax.util.DataUtils;

public class IndexInfo{
    long index_id;
    String index_name;
    String index_code;
    String cal_code;
    String include_code;
    long cal_type_id;
    long index_level_id;
    long date_type_id;
    long tax_info_id;

    public IndexInfo(){

    }

    public int compareTo(IndexInfo o2){
        long o1_level_id = getIndex_level_id();
        long o2_level_id = o2.getIndex_level_id();
        int o1_level = Integer.valueOf(DataUtils.queryTypeById(o1_level_id).getType_code());
        int o2_level = Integer.valueOf(DataUtils.queryTypeById(o2_level_id).getType_code());
        return o1_level-o2_level;
    }

    public IndexInfo(long index_id, String index_name, String index_code, String cal_code, String include_code, long cal_type_id, long index_level_id, long date_type_id, long tax_info_id) {
        this.index_id = index_id;
        this.index_name = index_name;
        this.index_code = index_code;
        this.cal_code = cal_code;
        this.include_code = include_code;
        this.cal_type_id = cal_type_id;
        this.index_level_id = index_level_id;
        this.date_type_id = date_type_id;
        this.tax_info_id = tax_info_id;
    }

    public String getInclude_code() {
        return include_code;
    }

    public void setInclude_code(String include_code) {
        this.include_code = include_code;
    }

    public long getIndex_id() {
        return index_id;
    }

    public void setIndex_id(long index_id) {
        this.index_id = index_id;
    }

    public String getIndex_name() {
        return index_name;
    }

    public void setIndex_name(String index_name) {
        this.index_name = index_name;
    }

    public String getIndex_code() {
        return index_code;
    }

    public void setIndex_code(String index_code) {
        this.index_code = index_code;
    }

    public String getCal_code() {
        return cal_code;
    }

    public void setCal_code(String cal_code) {
        this.cal_code = cal_code;
    }

    public long getCal_type_id() {
        return cal_type_id;
    }

    public void setCal_type_id(long cal_type_id) {
        this.cal_type_id = cal_type_id;
    }

    public long getIndex_level_id() {
        return index_level_id;
    }

    public void setIndex_level_id(long index_level_id) {
        this.index_level_id = index_level_id;
    }

    public long getDate_type_id() {
        return date_type_id;
    }

    public void setDate_type_id(long date_type_id) {
        this.date_type_id = date_type_id;
    }

    public long getTax_info_id() {
        return tax_info_id;
    }

    public void setTax_info_id(long tax_info_id) {
        this.tax_info_id = tax_info_id;
    }
}